<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <title>登录 - AI交易模拟器</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico?v={{ app_version }}">
    <link rel="stylesheet" href="/static/style.css?v={{ app_version }}">
</head>
<body>
    <div class="login-container">
        <div class="login-card">
            <div class="login-header">
                <div class="logo">
                    <div class="logo-icon">AI</div>
                    <h1>AI交易模拟器</h1>
                </div>
                <p class="subtitle">欢迎回来<br>登录或注册你的账号</p>
            </div>

            <div class="login-tabs">
                <button class="login-tab active" data-tab="login">登录</button>
                <button class="login-tab" data-tab="register">注册</button>
            </div>

            <!-- 登录表单 -->
            <form id="loginForm" class="auth-form active">
                <div class="form-group">
                    <label>用户名</label>
                    <input type="text" id="loginUsername" class="form-input" placeholder="请输入用户名" required>
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <input type="password" id="loginPassword" class="form-input" placeholder="至少6位" required>
                </div>
                <button type="submit" class="btn-submit">登录</button>

                <!-- 第三方登录分隔线 -->
                <div class="oauth-divider">
                    <span>第三方登录</span>
                </div>

                <!-- Linux DO OAuth登录 -->
                <div class="oauth-buttons">
                    <a href="/api/auth/linuxdo" class="oauth-btn linuxdo-btn" title="使用 Linux DO 登录">
                        <img src="/image/linuxdo.ico" alt="Linux DO" class="oauth-icon">
                    </a>
                </div>

                <div class="form-footer">
                    <a href="#" class="link-text">还没账号</a>
                </div>
            </form>

            <!-- 注册表单 -->
            <form id="registerForm" class="auth-form">
                <div class="form-group">
                    <label>用户名</label>
                    <input type="text" id="registerUsername" class="form-input" placeholder="请输入用户名" required>
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <input type="password" id="registerPassword" class="form-input" placeholder="至少6位" required>
                </div>
                <div class="form-group">
                    <label>邮箱（可选）</label>
                    <input type="email" id="registerEmail" class="form-input" placeholder="your@email.com">
                </div>
                <button type="submit" class="btn-submit">注册</button>
                <div class="form-footer">
                    <span class="hint-text">本平台仅供娱乐学习使用，信息安全请妥善保管</span>
                </div>
            </form>

            <div id="errorMessage" class="error-message" style="display: none;"></div>
        </div>
    </div>

    <script src="/static/auth.js?v={{ app_version }}"></script>
</body>
</html>

